{"openapi":"3.1.0","info":{"title":"Booking service","version":"0.1.0"},"servers":[{"url":"/api"}],"paths":{"/user/":{"get":{"tags":["User"],"summary":"Get Users","operationId":"get_users_user__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response Get Users User  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["User"],"summary":"Add User","operationId":"add_user_user__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/{user_id}":{"get":{"tags":["User"],"summary":"Get User","operationId":"get_user_user__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["User"],"summary":"Delete User","operationId":"delete_user_user__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["User"],"summary":"Edit User","operationId":"edit_user_user__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tour/":{"get":{"tags":["Tour"],"summary":"Get Tours","operationId":"get_tours_tour__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TourResponse"},"type":"array","title":"Response Get Tours Tour  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Tour"],"summary":"Add Tour","operationId":"add_tour_tour__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/tour/{tour_id}":{"get":{"tags":["Tour"],"summary":"Get Tour","operationId":"get_tour_tour__tour_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tour_id","in":"path","required":true,"schema":{"type":"integer","title":"Tour Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tour"],"summary":"Delete Tour","operationId":"delete_tour_tour__tour_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tour_id","in":"path","required":true,"schema":{"type":"integer","title":"Tour Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tour"],"summary":"Edit Tour","operationId":"edit_tour_tour__tour_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tour_id","in":"path","required":true,"schema":{"type":"integer","title":"Tour Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TourResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/":{"get":{"tags":["Booking"],"summary":"Get Bookings","operationId":"get_bookings_booking__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingResponse"},"type":"array","title":"Response Get Bookings Booking  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Booking"],"summary":"Add Booking","operationId":"add_booking_booking__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/booking/{booking_id}":{"get":{"tags":["Booking"],"summary":"Get Booking","operationId":"get_booking_booking__booking_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Booking"],"summary":"Delete Booking","operationId":"delete_booking_booking__booking_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Booking"],"summary":"Edit Booking","operationId":"edit_booking_booking__booking_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/booking/user/{user_id}":{"get":{"tags":["Booking"],"summary":"Get User Bookings","operationId":"get_user_bookings_booking_user__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BookingResponse"},"title":"Response Get User Bookings Booking User  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BookingCreate":{"properties":{"user_id":{"type":"integer","title":"User Id"},"tour_id":{"type":"integer","title":"Tour Id"},"date":{"type":"string","format":"date-time","title":"Date"}},"type":"object","required":["user_id","tour_id","date"],"title":"BookingCreate"},"BookingResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"tour_id":{"type":"integer","title":"Tour Id"},"date":{"type":"string","format":"date-time","title":"Date"}},"type":"object","required":["id","user_id","tour_id","date"],"title":"BookingResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TourCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price":{"type":"number","title":"Price"},"photo":{"type":"string","title":"Photo"},"duration":{"type":"string","title":"Duration"}},"type":"object","required":["name","description","price","photo","duration"],"title":"TourCreate"},"TourResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price":{"type":"number","title":"Price"},"photo":{"type":"string","title":"Photo"},"duration":{"type":"string","title":"Duration"}},"type":"object","required":["id","name","description","price","photo","duration"],"title":"TourResponse"},"UserCreate":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"username":{"type":"string","title":"Username"},"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["first_name","last_name","username","is_admin"],"title":"UserCreate"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"username":{"type":"string","title":"Username"},"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["id","first_name","last_name","username","is_admin"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}